package com.yue.yadmin.service;

import java.util.List;

import tk.mybatis.mapper.entity.Example.Criteria;

import com.github.pagehelper.PageInfo;
import com.yue.yadmin.model.BaseModel;


public interface BaseService<T extends BaseModel> {
	
	public List<T> getList(T model);
	
	PageInfo<T> getPage(T model);
	
	public int deleteByID(Long id);

	public int insert(T model);

	public T selectByPrimaryKey(Long id);

	public int update(T model);
	
	List<T> selectBy(String propertyName, Object value);

	T selectOneBy(String propertyName, Object value);
	
	List<T> selectUniqueBy(String propertyName, Object value);

	T selectUniqueOneBy(String propertyName, Object value);

	List<T> selectList(Criteria criteria);

	T selectOne(Criteria criteria);

	T get(T model);


}
